home *** CD-ROM | disk | FTP | other *** search
/ Nejlepší České Hry / Nej české hry.iso / hry / vesmirna becherovka / 2004 Vesmírná Becherovka / Becherovka.exe / scripts / DefineSprite_1305 / frame_1 / DoAction.as
Encoding:
Text File  |  2004-09-30  |  1.2 KB  |  49 lines

  1. function Speak(Osoba, SText, Orient, EngText, Driver)
  2. {
  3.    if(Orient == "R")
  4.    {
  5.       X = getProperty(Osoba, _X) + Osoba.hx * Osoba._xscale / 100;
  6.    }
  7.    else
  8.    {
  9.       X = getProperty(Osoba, _X) - Osoba.hx * Osoba._xscale / 100;
  10.    }
  11.    Y = getProperty(Osoba, _Y) + Osoba.hy * Osoba._yscale / 100;
  12.    _root.s.bubble.Text = SText;
  13.    if(_root.menu.eng)
  14.    {
  15.       _root.s.bubble.Text = engText;
  16.    }
  17.    _root.s.bubble.Count = 12 + length(SText);
  18.    _root.s.bubble.i = 1;
  19.    _root.s.bubble.Osoba = Osoba;
  20.    _root.s.bubble.Driver = Driver;
  21.    _root.s.bubble.Orient = Orient;
  22.    if(Orient == "R")
  23.    {
  24.       _root.s.bubble.gotoAndPlay(4);
  25.       setProperty("_root.s.bubble", _X, X + Osoba._width / 1.5);
  26.    }
  27.    else
  28.    {
  29.       _root.s.bubble.gotoAndPlay(2);
  30.       setProperty("_root.s.bubble", _X, X - Osoba._width / 1.5);
  31.    }
  32.    setProperty("_root.s.bubble", _Y, Y - 30 * Osoba._xscale / 100);
  33.    if(Orient == "L" || Orient == "R")
  34.    {
  35.       tellTarget(Osoba)
  36.       {
  37.          gotoAndStop("SpeakR");
  38.          play();
  39.       }
  40.    }
  41.    else
  42.    {
  43.       tellTarget(Osoba)
  44.       {
  45.          gotoAndPlay("Speak" + Orient);
  46.       }
  47.    }
  48. }
  49.